/*
* SavingsAccount
*
* r1
*
* GNU General Public License v3.0
*/

package com.acme.bankapp.domain.bank;

public class SavingsAccount extends AbstractAccount {
	
	private double balance;
	
	public SavingsAccount(double balance) {
		this.balance = balance;
	}
	
	public void deposit(double amount) {
		this.balance += amount;
	}

	public void withdraw(double amount) {
		if(this.balance >= amount) {
			this.balance -= amount;
		}
	}
	
	public double getBalance() {
		return this.balance;
	}
	
	public double maximumAmountToWithdraw() {
		return this.balance;
	}
	
}
